package scanpackage.filter;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.FullHttpRequest;
import org.springframework.stereotype.Service;

@Service
public class HeaderHttpRequestFilter implements HttpRequestFilter {

    @Override
    public void filter(FullHttpRequest fullRequest, ChannelHandlerContext ctx) {
        //给所有经过网关的请求的请求头添加约定的"yourname"信息
        fullRequest.headers().set("yourname", "stephanie");
    }
}